//计算平均分
function average() {
    let sum = 0;
    for (let i = 1; i <= 5; i++) {
        let score = prompt(`请输入5门功课中第${i}门课的成绩：`);
        score = parseFloat(score);
        sum += score;
    }
    document.write(`5门课的平均分是${sum / 5}`);
}
average()